<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="js/vue.min.js"></script>
</head>
<body>
<div id="myApp">
<h3>数据修改</h3>
<h4>{{title}}</h4>
<button @click="btnClick()">{{message}}</button>
</div>
<script type="text/javascript">
var myApp = new Vue({
	el:"#myApp",
	data:{
		click:0,
		title:'hello world',
		message:'按钮',
		curObj:Object
	},
	methods:{
		btnClick:function(){
			this.title = "你好！";
			// 通过 Vue.set 方法用来新增对象的属性
			if(!this.curObj.count){
				Vue.set(this.curObj,'count',1);
			}else{
				this.curObj.count ++;
			};
		}
	}
});
</script>
</body>
</html>